/**
 * Copyright (C) 2016 Juno Inc., All Rights Reserved.
 */
package com.jyl.designPattern.creational.simpleFactory;

/**
 *
 * @author Long, E-mail:jyl0401@163.com
 * @date 2019年4月20日 上午7:22:33
 */
public class SimpleFactory {
	
	public static Product concreateProduct(int type){
		if(type==2){
			return new ConcreateProduct2();
		}else if(type==3){
			return new ConcreateProduct3();
		}
		return new ConcreateProduct();
	}

	public static void main(String[] args) {
		SimpleFactory.concreateProduct(1);
	}
}
